/**
 * Created by apple on 16/11/10.
 */
var React = require('react');

var Login = React.createClass({
    getInitialState:function () {
        return {

        }
    },
    getDefaultProps:function () {
        return {
            title:"LoginIn"
        }
    },
    Login:function () {
        this.props.Login(this.refs.loginName.value);
    },

    render:function () {
        return  <div>
                    LoginIn<br />
                    <input type="text"  ref="loginName" placeholder={this.props.title} />
                    <button onClick={this.Login}>login</button>
                </div>;
    }
})

module.exports = Login;